package pkg

import (
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
)

type Baidu struct {
	ConclusionType int `json:"conclusionType"`
}

func Check(message string) bool {
	client := censor.NewClient("8SqvFDa4cAdboYqITL6D8KR4", "gWD5If20vcjp1w8iYOdi86gnygVorVRO")
	//如果是百度云ak sk,使用下面的客户端

	res := client.TextCensor(message)
	fmt.Println(res)
	var ress Baidu
	if ress.ConclusionType == 1 {
		return true
	}
	//图片url
	return false
}
